<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2022/11/23
  Time: 10:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"  isELIgnored="false"  %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>考试管理</title>
    <base href="${pageContext.request.scheme }://${pageContext.request.serverName }:${pageContext.request.serverPort }${pageContext.request.contextPath }/ "/>
    <!-- Bootstrap -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script src="https://cdn.jsdelivr.cn/npm/jquery@1.12.4/dist/jquery.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>

</head>
<body>
    <h1>更新考试题目</h1>
    <form action="quetion.do?m=update" method="post" enctype="multipart/form-data">
        <input type="hidden" name="id" value="${quetion.id}">
        <p>问题：<input type="text" placeholder="请输入问题" name="content" value="${quetion.content}"></p>
        <p>难度：
            <select name="difficulty">
                <option value="1" ${quetion.difficulty==1?'selected':''}>1</option>
                <option value="2" ${quetion.difficulty==1?'selected':''}>2</option>
                <option value="3" ${quetion.difficulty==1?'selected':''}>3</option>
                <option value="4" ${quetion.difficulty==1?'selected':''}>4</option>
            </select>
        </p>
        <p>选项A：<input type="text" placeholder="请输入选项A" name="optionA" value="${quetion.optionA}"></p>
        <p>选项B：<input type="text" placeholder="请输入选项B" name="optionB" value="${quetion.optionB}"></p>
        <p>选项C：<input type="text" placeholder="请输入选项C" name="optionC" value="${quetion.optionC}"></p>
        <p>选项D：<input type="text" placeholder="请输入选项D" name="optionD" value="${quetion.optionD}"></p>
        <p>答案：<input type="text" placeholder="请输入答案" name="answer" value="${quetion.answer}"></p>
        <p>图片：<input type="file" name="image" value="${quetion.image}"></p>
        <p>考题：
            <select name="quetionSetId">
                <option >请输入考题</option>
                <c:forEach var="quetionSet" items="${quetionSets}">
                    <option value="${quetionSet.id}" ${quetion.quetionSetId==quetionSet.id?'selected':''}>${quetionSet.title}</option>
                </c:forEach>
            </select>
        </p>
        <p><input type="submit" value="提交"></p>
    </form>
</body>
</html>
